
DIR=`(cd $1; pwd)`
#echo $DIR

mkdir -p ./out

for SOURCE in `find $1 -type f -name "*.java" | grep -v "\.svn" | grep -v "\/test\/" | grep -v "block"`; do
#echo $SOURCE
SOURCE_DIR=`dirname $SOURCE`
SOURCE_DIR=`(cd $SOURCE_DIR; pwd)`
SOURCE_FILE=`basename $SOURCE`

#RESULT_DIR=./out${SOURCE_DIR#$DIR}
#RESULT_FILE=`basename $SOURCE`.blm
#echo $RESULT_FILE

#echo $RESULT_DIR/$RESULT_FILE
#mkdir -p $RESULT_DIR
echo $SOURCE_DIR/$SOURCE_FILE
echo "$SOURCE_DIR/$SOURCE_FILE" >> out.txt
svn blame $SOURCE | ./a.out >> out.txt
echo "=========================================" >> out.txt
#$RESULT_DIR/$RESULT_FILE

done
